﻿<!--
    Jarloo
    http://jarloo.com
 
    This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License  
    http://creativecommons.org/licenses/by-sa/3.0/     

-->
<Window x:Class="Jarloo.CardStock.Views.CardDeckView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        Title="CardStock" Height="525" Width="600">

    <Grid>        
        <ItemsControl ItemsSource="{Binding Quotes}">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <Border BorderThickness="1" Height="100" Margin="5,5,0,0" VerticalAlignment="Top" CornerRadius="5" BorderBrush="#FF4B4B4B" HorizontalAlignment="Left" Width="125">
                        <Border.Background>
                            <LinearGradientBrush EndPoint="0.524,0.805" StartPoint="0.525,0.229">
                                <GradientStop Color="#FFEBEBEB"/>
                                <GradientStop Color="#FFEFEFEF" Offset="1"/>
                                <GradientStop Color="#FFD1D1D1" Offset="0.56"/>
                                <GradientStop Color="#FFD4D4D4" Offset="0.483"/>
                            </LinearGradientBrush>
                        </Border.Background>

                        <StackPanel Margin="0,5,5,0" VerticalAlignment="Top">
                            <TextBlock TextAlignment="Right" FontWeight="Bold" Text="{Binding Symbol}" Height="16"/>
                            <TextBlock TextAlignment="Right" Text="{Binding Name}" />
                            <TextBlock TextAlignment="Right" Text="{Binding LastTradePrice}" FontSize="26"/>
                            <TextBlock TextAlignment="Right" Text="{Binding LastUpdate,StringFormat={}{0:HH:mm:ss}}" FontSize="10" Foreground="DarkGray"/>
                        </StackPanel>                        
                    </Border>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
            <ItemsControl.Template>
                <ControlTemplate>
                    <ScrollViewer Padding="{TemplateBinding Padding}" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <ItemsPresenter />
                    </ScrollViewer>
                </ControlTemplate>
            </ItemsControl.Template>
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapPanel>
                    </WrapPanel>
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
        </ItemsControl>

        
    </Grid>
</Window>
